package cn.edu.scau.cmi.yejiancong.finsh;

import cn.edu.scau.cmi.yejiancong.interfaceProgramming.client.american;
import cn.edu.scau.cmi.yejiancong.interfaceProgramming.client.chinese;
import cn.edu.scau.cmi.yejiancong.interfaceProgramming.client.speak;
import cn.edu.scau.cmi.yejiancong.singtelon.Main;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;

public class finalviewController {
	@FXML
	private Button sing;
	@FXML
	private Button mult;
	@FXML
	private Button inter;
	@FXML
	private Button simplefatcory;
	@FXML
	private Button factory;
	@FXML
	private Button abstractfactoty;
	@FXML
	private Button adpaterobject;
	@FXML
	private Button adpaterclass;
	@FXML
	private Button hibernate;
	@FXML
	private Button composit;
	
	@FXML
	private Pane pane=new Pane();
	@FXML
	private void initialize() {
		Image image=new Image(getClass().getResourceAsStream("yjc.jpg"));
		ImageView imageView=new ImageView(image);
		imageView.setFitHeight(150);
		imageView.setFitWidth(150);
		pane.getChildren().add(imageView);
	}
	
	public void sing() {
		
		Stage stage=new Stage();
		
		try {
			
			Parent root=FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/yejiancong/singtelon/view.fxml"));
			
			Scene scene=new Scene(root);
			stage.setScene(scene);
			stage.show();
			
		} catch (Exception e) {
			// TODO: handle exception
		}
		
		
	}
public void mult() {
		
		Stage stage=new Stage();
		
		try {
			
			Parent root=FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/yejiancong/multtelo/view.fxml"));
			
			Scene scene=new Scene(root);
			stage.setScene(scene);
			stage.show();
			
		} catch (Exception e) {
			// TODO: handle exception
		}
		
		
	}
public void inter() {
	
	speak chineses=new speak();
	chineses.setMan(new chinese());
	chineses.language();
	speak americans =new speak();
	americans.setMan(new american());
	americans.language();
	
	
}
public void simplefactory() {
	
	Stage stage=new Stage();
	
	try {
		
		Parent root=FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/yejiancong/simplefactory/view.fxml"));
		
		Scene scene=new Scene(root);
		stage.setScene(scene);
		stage.show();
		
	} catch (Exception e) {
		// TODO: handle exception
	}
	
	
}
public void factory() {
	
	Stage stage=new Stage();
	
	try {
		
		Parent root=FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/yejiancong/factory/client/view.fxml"));
		
		Scene scene=new Scene(root);
		stage.setScene(scene);
		stage.show();
		
	} catch (Exception e) {
		// TODO: handle exception
	}
	
	
}
public void abstractfactory() {
	
	Stage stage=new Stage();
	
	try {
		
		Parent root=FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/yejiancong/abstractFactory/client/view.fxml"));
		
		Scene scene=new Scene(root);
		stage.setScene(scene);
		stage.show();
		
	} catch (Exception e) {
		// TODO: handle exception
	}
	
	
}
public void adpater() {
	
	Stage stage=new Stage();
	
	try {
		
		Parent root=FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/yejiancong/adpater/view.fxml"));
		
		Scene scene=new Scene(root);
		stage.setScene(scene);
		stage.show();
		
	} catch (Exception e) {
		// TODO: handle exception
	}
	
	
}
public void hibernate() {
	
	Stage stage=new Stage();
	
	try {
		
		Parent root=FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/yejiancong/ORM/client/view.fxml"));
		
		Scene scene=new Scene(root);
		stage.setScene(scene);
		stage.show();
		
	} catch (Exception e) {
		// TODO: handle exception
	}
	
	
}
public void composit() {
	
	Stage stage=new Stage();
	
	try {
		
		Parent root=FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/yejiancong/composit/GUI.fxml"));
		
		Scene scene=new Scene(root);
		stage.setScene(scene);
		stage.show();
		
	} catch (Exception e) {
		// TODO: handle exception
	}
	
	
}
}
